{extend name='admin@main'}

{block name="button"}
{if auth("store/part/add")}
<button data-open='{:url("add")}' data-title="添加OTA部位" class='layui-btn layui-btn-sm layui-btn-primary'>添加OTA部位</button>
{/if}
{if auth("store/part/remove")}
<button data-action='{:url("remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除OTA部位</button>
{/if}
{/block}

{block name="content"}

<div class="think-box-shadow">
    {include file='part/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='text-left nowrap'>ID</th>
            <!--<th class='text-left nowrap'>OTA部位名称</th>-->
            <th class='text-left nowrap'>部位名称</th>
            <th class='text-left nowrap'>部位更新指令</th>
            <th class='text-left nowrap'>上传时间</th>
            <th class='text-left nowrap'>操作</th>

            <th></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
            <td class='text-left nowrap'>
                <div class="inline-block">
                    {$vo.id|default=''}
                </div>
            </td>
            <!--<td class='text-left nowrap'>-->
                <!--<div class="inline-block">-->
                    <!--{$vo.h_name|default=''}-->
                <!--</div>-->
            <!--</td>-->

            <td class='text-left nowrap'>
                <div class="inline-block">
                    {$vo.part_name|default=''}
                </div>
            </td>

            <td class='text-left nowrap'>
                <div class="inline-block">
                    {$vo.update_instruct|default=''}
                </div>
            </td>

            <td class='text-left nowrap'>
                <div class="inline-block">
                    {$vo.create_at|default=''}
                </div>
            </td>

            <td class='text-left nowrap'>

                <div class="nowrap margin-bottom-5">
                    <a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
                    <!--{if isset($vo.status) and $vo.status eq 1}-->
                    <!--<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0">禁 用</a>-->
                    <!--{else}-->
                    <!--<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>-->
                    <!--{/if}-->
                </div>

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
{/block}
